/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import control.OtoController;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import model.Oto;

/**
 *
 * @author Lc.Danh
 */
public class frmOTO extends javax.swing.JFrame {

    /**
     * Creates new form OTO
     */
    public frmOTO() throws SQLException, IOException {
        initComponents();
        
        //Khởi tạo các thành phần
        cbKhachHang.setModel(OtoController.LayKH());
        OtoController.ShowTable(tbOto);
        SetDate();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtBienSo = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        cbKhachHang = new javax.swing.JComboBox();
        cbHieuSo = new javax.swing.JComboBox();
        txtModel = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jSpinner1 = new javax.swing.JSpinner();
        jSpinner2 = new javax.swing.JSpinner();
        jSpinner3 = new javax.swing.JSpinner();
        jLabel6 = new javax.swing.JLabel();
        rbDH = new javax.swing.JRadioButton();
        rbNH = new javax.swing.JRadioButton();
        btnSearch = new javax.swing.JButton();
        btnRefesh = new javax.swing.JButton();
        btnInsert = new javax.swing.JButton();
        btnDelete = new javax.swing.JButton();
        btnUpdate = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbOto = new javax.swing.JTable();

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);

        jLabel1.setText("Biển số");

        jLabel2.setText("Khách hàng");

        jLabel3.setText("Hiệu xe");

        jLabel4.setText("Model");

        cbKhachHang.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbHieuSo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Acura ", "Alfa Romeo ", "Audi ", "Bentley", "BMW ", "Cadillac", "Chevrolet ", "Chrysler ", "Citroen ", "Dodge ", "Fiat ", "Ford ", "GMC ", "Honda ", "Hyundai ", "Infiniti ", "Isuzu", "Jeep ", "Kia", "Lancia ", "Lexus ", "Lincoln ", "Mahindra & Mahindra ", "Maruti ", "Maybach", "Mazda ", "Mercedes-Benz ", "Mercury ", "Mini", "Mitsubishi ", "Nissan ", "Opel ", "Peugeot ", "Pontiac ", "Porsche ", "Rolls Royce", "Renault ", "Saab ", "Scion ", "Seat ", "Skoda ", "Smart", "Subaru ", "Suzuki ", "Tata ", "Toyota ", "Volkswagen ", "Volvo" }));

        jLabel5.setText("Ngày đăng kí");

        jLabel6.setText("Loại gửi");

        rbDH.setText("Dài hạn");
        rbDH.setActionCommand("DH");
        rbDH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DaiHani_Click(evt);
            }
        });

        rbNH.setText("Ngắn hạn");
        rbNH.setActionCommand("NH");
        rbNH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NganHan_Click(evt);
            }
        });

        btnSearch.setText("Search");
        btnSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchActionPerformed(evt);
            }
        });

        btnRefesh.setText("Refesh-Clear");
        btnRefesh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefeshActionPerformed(evt);
            }
        });

        btnInsert.setText("Insert");
        btnInsert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInsertActionPerformed(evt);
            }
        });

        btnDelete.setText("Delete");
        btnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActionPerformed(evt);
            }
        });

        btnUpdate.setText("Update");
        btnUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUpdateActionPerformed(evt);
            }
        });

        tbOto.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "Biển số", "Khách hàng", "Hiệu xe", "Model", "Ngày kí gửi", "Loại gửi"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        tbOto.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tbOto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Table_Click(evt);
            }
        });
        jScrollPane1.setViewportView(tbOto);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel1))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtBienSo)
                                    .addComponent(cbKhachHang, 0, 124, Short.MAX_VALUE))
                                .addGap(43, 43, 43)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel4))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(cbHieuSo, 0, 130, Short.MAX_VALUE)
                                    .addComponent(txtModel)))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(40, 40, 40)
                                .addComponent(btnRefesh)
                                .addGap(35, 35, 35)
                                .addComponent(btnInsert, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel6))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(rbDH)
                                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(39, 49, Short.MAX_VALUE)
                                .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(rbNH)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jSpinner3))))
                    .addComponent(jScrollPane1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtBienSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(cbHieuSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4)
                    .addComponent(cbKhachHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtModel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(rbDH)
                    .addComponent(rbNH))
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSearch)
                    .addComponent(btnRefesh)
                    .addComponent(btnInsert)
                    .addComponent(btnDelete)
                    .addComponent(btnUpdate))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    //Hàm chỉnh ngày hiện tại
    private void SetDate()
    {
        Calendar calendar = Calendar.getInstance();
        jSpinner1.setValue(calendar.get(Calendar.DAY_OF_MONTH));
        jSpinner2.setValue(calendar.get(Calendar.MONTH));
        jSpinner3.setValue(calendar.get(Calendar.YEAR));
    }
    
    //Nút refesh - clear 
    private void btnRefeshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefeshActionPerformed
      // TODO add your handling code here:
            //Hiện table xe
        try {
            OtoController.ShowTable(tbOto);
        } catch (SQLException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        }
        catch (IOException ex) {
                Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
            }
        
        //Xóa các textbox, chỉnh lại ngày
        txtBienSo.setText("");
        txtModel.setText("");
        SetDate();
    }//GEN-LAST:event_btnRefeshActionPerformed

    
    //Nút thêm ô tô
    private void btnInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInsertActionPerformed
        // TODO add your handling code here:
        Oto xe = new Oto();
        
        Calendar cal = Calendar.getInstance();
        cal.set(Integer.parseInt(jSpinner3.getModel().getValue().toString()), Integer.parseInt(jSpinner2.getModel().getValue().toString()), Integer.parseInt(jSpinner1.getModel().getValue().toString()));
        
        java.sql.Date date = new java.sql.Date(cal.getTimeInMillis());
                
        xe.setNgayVao(date);
        xe.setBienSo(txtBienSo.getText());
        xe.setMaKH(cbKhachHang.getSelectedItem().toString());
        xe.setNhanHieu(cbHieuSo.getSelectedItem().toString());
        xe.setModel(txtModel.getText());
        if (rbDH.isSelected()==true)
            xe.setLoaiGui(1);
        else xe.setLoaiGui(0);
        
        JOptionPane.showMessageDialog(this,OtoController.ThemXe(xe)+" đã thêm");
        
        try {
            OtoController.ShowTable(tbOto);
        } catch (SQLException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnInsertActionPerformed

    //Nút dài hạn check
    private void DaiHani_Click(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DaiHani_Click
        // TODO add your handling code here:
        rbDH.setSelected(true);
        rbNH.setSelected(false);
    }//GEN-LAST:event_DaiHani_Click
    
    //Nút ngắn hạn check
    private void NganHan_Click(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NganHan_Click
        // TODO add your handling code here:
        rbDH.setSelected(false);
        rbNH.setSelected(true);
    }//GEN-LAST:event_NganHan_Click

    //Click vào danh sách, đẩy dữ liệu lên textbox
    private void Table_Click(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Table_Click
        // TODO add your handling code here:
        txtBienSo.setText(tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 0).toString());
        cbKhachHang.getModel().setSelectedItem(tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 1));
        cbHieuSo.getModel().setSelectedItem(tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 2));
        txtModel.setText(tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 3).toString());
        
        String ngay = tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 4).toString();
        String ng[] = ngay.split("-");
        String ng2[] = ng[2].split(" ");
        
        jSpinner1.setValue(Integer.parseInt(ng2[0]));
        jSpinner2.setValue(Integer.parseInt(ng[1]));
        jSpinner3.setValue(Integer.parseInt(ng[0]));
        
        if (Integer.parseInt(tbOto.getModel().getValueAt(tbOto.getSelectedRow(), 5).toString())==1)
        {
            rbDH.setSelected(true);
            rbNH.setSelected(false);
        }
        else
        {
            rbDH.setSelected(false);
            rbNH.setSelected(true);
        }            
    }//GEN-LAST:event_Table_Click

    //Nút xóa ô tô
    private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed
        // TODO add your handling code here:
        Oto xe = new Oto();
        
        xe.setBienSo(txtBienSo.getText());
        JOptionPane.showMessageDialog(this,OtoController.Delete(xe)+" đã xóa");
        
        try {
            OtoController.ShowTable(tbOto);
        } catch (SQLException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnDeleteActionPerformed
    
    //Nút cập nhật thông tin ô tô
    private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed
        // TODO add your handling code here:
        Oto xe = new Oto();
        Calendar cal = Calendar.getInstance();
        cal.set(Integer.parseInt(jSpinner3.getModel().getValue().toString()), Integer.parseInt(jSpinner2.getModel().getValue().toString()), Integer.parseInt(jSpinner1.getModel().getValue().toString()));
        
        java.sql.Date date = new java.sql.Date(cal.getTimeInMillis());
                
        xe.setNgayVao(date);
        xe.setBienSo(txtBienSo.getText());
        xe.setMaKH(cbKhachHang.getSelectedItem().toString());
        xe.setNhanHieu(cbHieuSo.getSelectedItem().toString());
        xe.setModel(txtModel.getText());
        if (rbDH.isSelected()==true)
            xe.setLoaiGui(1);
        else xe.setLoaiGui(0);
        
        JOptionPane.showMessageDialog(this,OtoController.CapNhat(xe)+" đã sửa");
        
        try {
            OtoController.ShowTable(tbOto);
        } catch (SQLException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnUpdateActionPerformed

    
    //Nút tìm thông tin xe theo biển số
    private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActionPerformed
        try {
            // TODO add your handling code here:
            OtoController.Search(tbOto,txtBienSo.getText());
        } catch (SQLException ex) {
            Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmOTO.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmOTO.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmOTO.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmOTO.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                try {
                    new frmOTO().setVisible(true);
                } catch (SQLException ex) {
                    Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IOException ex) {
                    Logger.getLogger(frmOTO.class.getName()).log(Level.SEVERE, null, ex);
                }
                
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDelete;
    private javax.swing.JButton btnInsert;
    private javax.swing.JButton btnRefesh;
    private javax.swing.JButton btnSearch;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JComboBox cbHieuSo;
    private javax.swing.JComboBox cbKhachHang;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JSpinner jSpinner2;
    private javax.swing.JSpinner jSpinner3;
    private javax.swing.JRadioButton rbDH;
    private javax.swing.JRadioButton rbNH;
    private javax.swing.JTable tbOto;
    private javax.swing.JTextField txtBienSo;
    private javax.swing.JTextField txtModel;
    // End of variables declaration//GEN-END:variables
}
